package day06_exception_collection.com.itheima.d5_list;

import java.util.LinkedList;

public class ListDemo4 {
    public static void main(String[] args) {
        LinkedList<String> queue = new LinkedList<>();
        queue.addLast("java");
        queue.addLast("java1");
        queue.addLast("java2");
        queue.addLast("java3");

        System.out.println("queue = " + queue);
        System.out.println("queue.removeFirst() = " + queue.removeFirst());
        System.out.println("queue = " + queue);
        LinkedList<String> stack = new LinkedList<>();
        stack.push("第一颗子弹");
        stack.push("第二颗子弹");
        stack.push("第三颗子弹");
        System.out.println("stack = " + stack);

        System.out.println("stack.pop() = " + stack.pop());
        System.out.println("stack.pop() = " + stack.pop());

    }
}
